package com.yz.jdd.module.cashier.scanpay;

import android.content.Context;


import com.yz.jdd.base.utils.PayConfig;
import com.yz.jdd.module.cashier.scanpay.exception.ExceptionModelImpl;
import com.yz.jdd.network.ApiCallback;
import com.yz.jdd.network.NetWorkRequset;
import com.yz.jdd.network.request.Request_Pay;

import rx.Subscription;

/**
 * Created by zrck on 2017/2/27.
 */

public class ScanpayModelImpl extends ExceptionModelImpl implements ScanpayContract.IScanpayModel {


    public ScanpayModelImpl(Context context) {
        super(context);
    }

    /**
     * 支付宝支付
     *
     * @param args
     * @param callback
     * @return
     */
    @Override
    public Subscription doPay(Request_Pay args, ApiCallback callback) {
//        if (PayConfig.TYPE_PAY_WEIXIN.equals(args.getPayType())) {
//             return NetWorkRequset.doWechatPay(getRequestPayParam(args), callback);
//        } else if(PayConfig.TYPE_PAY_ALIPAY.equals(args.getPayType())) {
//             return NetWorkRequset.doAliPay(getRequestPayParam(args), callback);
//        } else{   // (PayConfig.TYPE_PAY_SCAN.equals(args.getPayType()))
            return NetWorkRequset.doScanpay(getRequestPayParam(args), callback);
//        }

    }




}